package com.ideasmaker.dao.user;

import java.sql.SQLException;
import java.util.List;

import com.ideasmaker.bean.User;
import com.ideasmaker.service.user.impl.UserQueryParam;

public interface IUserDao {
	
	/**
	 * save user from User into DB 
	 * @param user
	 * @throws SQLException
	 */
	public void saveUser(User user)throws SQLException;
	
	
	/**
	 * delete user by userId from User
	 * @param user
	 * @throws SQLException
	 */
	public void deleteUser(User user)throws SQLException;
	
	/**
	 * update user  from User to DB
	 * @param user
	 * @throws SQLException
	 */
	public void updateUser(User user)throws SQLException;
	
	/**
	 * 
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public User queryUserById(User user)throws SQLException;
	
	/**
	 * 
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public List<User> queryUserByFilter(UserQueryParam user)throws SQLException;
	
	/**
	 * 
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public int queryRecordCountByFilter(User user)throws SQLException;
	
	/**
	 * find user by userName from User
	 * @param user
	 * @return
	 * @throws SQLException
	 */
	public boolean queryUserByName(User user)throws SQLException;
}
